package com.kucai.yifaqapp.global;

import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;



import java.io.File;


/**
 * Created by Administrator on 2017/8/4.
 * Application
 */

public class App extends MultiDexApplication {
    public static File cacheDir;
    private static Context globalApplicationContext;//全局ApplicationContext

    @Override
    public void onCreate() {
        super.onCreate();
        cacheDir = getCacheDir();
    }

    public static Context getContext() {
        return globalApplicationContext;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
        init(this);
    }

    public static void init(Context baseContext) {
        globalApplicationContext = baseContext;
    }

}
